﻿<MSheet Class="service-card fill-height-on-desktop">
    <div class="header">
        <img src="@Image" height="80" width="80" class="header-icon" alt="@Title" />
        <div class="header-title">@Title</div>
    </div>

    <div class="contents">
        @if (Contents is not null)
        {
            foreach (var (major, minor) in Contents)
            {
                <div class="content-item">
                    <div class="major">
                        <MIcon Size="20" Color="@IconColor">@Icon</MIcon>
                        <div style="margin-left: 10px">@major</div>
                    </div>
                    @if (!string.IsNullOrWhiteSpace(minor))
                    {
                        <div class="regular3--text minor">@minor</div>
                    }
                </div>
            }
        }
    </div>
</MSheet>

@code {

    [Parameter]
    public string? Image { get; set; }

    [Parameter, EditorRequired]
    public string? Icon { get; set; }

    [Parameter]
    public string? IconColor { get; set; } = "primary";

    [Parameter]
    public string? Title { get; set; }

    [Parameter]
    public List<(string Major, string? Minor)>? Contents { get; set; }

}
